package com.shrct.businessprocess.product.events;

import com.shrct.businessprocess.product.RCCompanyServiceEntry;
import com.shrct.businessprocess.product.RCFullServiceProductEntry;
import com.shrct.businessprocess.product.RCLogicProduct;
import com.shrct.businessprocess.product.RCRMABorrowReplacementEvent;
import com.shrct.businessprocess.product.RCRMAChildrenReplacementEvent;
import com.shrct.businessprocess.product.RCRMANormalReplacementEvent;
import com.shrct.businessprocess.product.events.RCLogicProductEventsListener;
import edu.fudan.mylang.pf.event.EntityEventsManager;
import java.util.Collection;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service("com.shrct.businessprocess.product.events.RCLogicProductEventsManager")
public class RCLogicProductEventsManager extends EntityEventsManager<RCLogicProduct> {
  @Autowired(required = false)
  private Collection<RCLogicProductEventsListener> listeners = com.google.common.collect.Lists.newArrayList();;
  
  protected Collection<RCLogicProductEventsListener> getListeners() {
    return listeners;
  }
  
  public void fire_registerFullServiceProduct(final RCLogicProduct entity, final RCFullServiceProductEntry serviceProduct) {
    for (edu.fudan.mylang.pf.event.IEntityEventsListner<?> listener : listeners) {
    	((RCLogicProductEventsListener)listener)._registerFullServiceProduct(entity,serviceProduct);
    }
    
  }
  
  public void fire_registerCompanyService(final RCLogicProduct entity, final RCCompanyServiceEntry companyService) {
    for (edu.fudan.mylang.pf.event.IEntityEventsListner<?> listener : listeners) {
    	((RCLogicProductEventsListener)listener)._registerCompanyService(entity,companyService);
    }
    
  }
  
  public void fire_unregisterCompanyService(final RCLogicProduct entity, final RCCompanyServiceEntry companyService) {
    for (edu.fudan.mylang.pf.event.IEntityEventsListner<?> listener : listeners) {
    	((RCLogicProductEventsListener)listener)._unregisterCompanyService(entity,companyService);
    }
    
  }
  
  public void fire_childrenReplacenebtRMA(final RCLogicProduct entity, final RCRMAChildrenReplacementEvent event) {
    for (edu.fudan.mylang.pf.event.IEntityEventsListner<?> listener : listeners) {
    	((RCLogicProductEventsListener)listener)._childrenReplacenebtRMA(entity,event);
    }
    
  }
  
  public void fire_borrowReplacementRMA(final RCLogicProduct entity, final RCRMABorrowReplacementEvent event) {
    for (edu.fudan.mylang.pf.event.IEntityEventsListner<?> listener : listeners) {
    	((RCLogicProductEventsListener)listener)._borrowReplacementRMA(entity,event);
    }
    
  }
  
  public void fire_normalRMA(final RCLogicProduct entity, final RCRMANormalReplacementEvent event) {
    for (edu.fudan.mylang.pf.event.IEntityEventsListner<?> listener : listeners) {
    	((RCLogicProductEventsListener)listener)._normalRMA(entity,event);
    }
    
  }
}
